package com.senchen.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能: 一句话简要概括功能
 * 作者: 小静VS静
 * 时间: 2020-10-31
 * 逻辑:TODO 在这里描述功能的大体逻辑
 * 版本:1.0
 * 修订:
 */
@RestController
@RequestMapping("producer")
public class Producer {
    @Autowired
    RabbitTemplate rabbitTemplate;

    @RequestMapping("/sendmessage")
    public  String sendmessage(String message){
        System.out.println("进入测试方法");
        rabbitTemplate.convertAndSend("testexchangeone","atm",message);
        return  message;
    }

}
